FROM hub.micro-i.com.cn:9443/library/java:jdk-8u341
MAINTAINER su@d4s.top

VOLUME /tmp

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && mkdir -p /webapps

WORKDIR /webapps
ADD ./target/*SNAPSHOT.jar /webapps/app.jar

ENV JAVA_OPTS="-Xms1024m -Xmx1024m"
ENV PROFILE_ACTIVES="local"

EXPOSE 8080

ENTRYPOINT ["sh","-c","java $JAVA_OPTS -Dspring.profiles.active=$PROFILE_ACTIVES -jar /webapps/app.jar com.example.demo.DemoApplication"]
